package thread;

public class ThreadDemo3 {
    public static void main(String[] args) {
        Thread t1 = new Thread(){
            @Override
            public void run() {
                for (int i=1;i<=1000;i++){
                    System.out.println("性格要自信");
                }
            }
        };

        Runnable r1 = new Runnable() {
            @Override
            public void run() {
                for (int i=1;i<=1000;i++){
                    System.out.println("多交流,出去走走");
                }
            }
        };

        Runnable r2 = ()-> {
                for (int i=1;i<=1000;i++){
                    System.out.println("多交流,出去走走,加油加油");
                }
        };

        Thread t2 = new Thread(r1);
        Thread t3 = new Thread(r2);
//        t1.start();
        t2.start();
//        t3.start();
        t2 = t3;
        t2.start();


    }
}
